package com.task5.service.impl;

import java.util.List;

import com.task5.entity.Product;
import com.task5.service.IProductService;
import com.task5.util.MysqlOperate;

public class IProductServiceImpl implements IProductService{

	@Override
	public void save(Product p) throws Exception {
		MysqlOperate.save(p);
	}

	@Override
	public void delete(Product p) throws Exception {
		MysqlOperate.delete(p);
	}

	@Override
	public void update(Product p) throws Exception {
		MysqlOperate.update(p);
	}

	@Override
	public Product select(Product p) throws Exception {
		return (Product) MysqlOperate.get(p);
	}

	@Override
	public List<Product> selectAll(Product p) throws Exception {
		return (List<Product>) MysqlOperate.getAll(p);
	}

}
